#ifndef STYLEBUTTON_H
#define STYLEBUTTON_H

#include "utkwidget_export.h"
#include "utkwidgetglobal.h"

#include <QPushButton>
#include <QEvent>

class UTKWIDGET_EXPORT UStyleButton : public QPushButton
{
    Q_OBJECT
public:
    explicit UStyleButton(const QString text, QWidget* parent = Q_NULLPTR);
    explicit UStyleButton(QWidget* parent = Q_NULLPTR);

    void setRadius(int radius);

    void setHoverColor(QColor color);

    void setRadiuPosition(RadiuPosition position);

protected:
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
    void enterEvent(QEvent* e) override;
#else
    void enterEvent(QEnterEvent* e) override;
#endif

    void leaveEvent(QEvent* e) override;
    void paintEvent(QPaintEvent* event) override;

private:
    bool m_isEnter = false;
    int m_radius = 0;
    QColor m_color = QColor();
    RadiuPosition m_position = Normal;
};

#endif // STYLEBUTTON_H
